/**
 * 枚举事物类型
 */
package com.zhao.enums;

public enum ThingTypeEnum {
	IMPORTANT_EMER(1,"重要紧急"),IMPORTANT_NOTEMER(2,"重要不紧急"),NOTIMPORTANT_EMER(3,"不重要紧急"),NOTIMPORTANT_NOTEMER(4,"不重要不紧急");
	private int index;
	private String desc;
	
	private ThingTypeEnum(int index,String desc){
		this.index = index;
		this.desc = desc;
	}
	
	public static String getName(int index){
		for (ThingTypeEnum thingType : ThingTypeEnum.values()) {
			if (thingType.getIndex() == index) {
				return thingType.getDesc();
			}
		}
		return null;
	}

	public int getIndex() {
		return index;
	}

	public String getDesc() {
		return desc;
	}
}
